Skip to content

feat: add v2 relatedResources handler#533

Open
gemammercado wants to merge 1 commit intomainfrom
relatedResourcesV2
Open

feat: add v2 relatedResources handler#533
gemammercado wants to merge 1 commit intomainfrom
relatedResourcesV2

Conversation

@gemammercado
Copy link
Copy Markdown
Contributor

@gemammercado gemammercado commented Apr 21, 2026

Add V2 endpoint for aws/cfn/template/resources/authored

Commit 802e844 changed the response shape of aws/cfn/template/resources/authored from string[] to AuthoredResource[] (objects with logicalId and type). This broke backward compatibility with existing clients (VSCode extension, alpha canaries) that expect a string array.

This PR restores the original V1 endpoint returning string[] and introduces a V2 endpoint at aws/cfn/template/resources/authored/v2 returning AuthoredResource[].

Changes

  • RelatedResourcesProtocol.ts — Reverted GetAuthoredResourceTypesRequest to string[], added GetAuthoredResourceTypesRequestV2 with new method path
  • LspRelatedResourcesHandlers.ts — Added onGetAuthoredResourceTypesV2 handler registration
  • RelatedResourcesHandler.ts — Restored original V1 handler (string[]), renamed existing handler to V2 (AuthoredResource[])
  • CfnServer.ts — Registers both V1 and V2 handlers
  • Tests — Added V1 handler tests, updated existing tests to reference V2, restored pre-802e844 test cases

@gemammercado gemammercado requested a review from a team as a code owner April 21, 2026 20:06
Comment thread tst/unit/handlers/RelatedResourcesHandler.test.ts Dismissed
Comment thread tst/unit/handlers/RelatedResourcesHandler.test.ts Dismissed
Comment thread tst/unit/handlers/RelatedResourcesHandler.test.ts Dismissed
Comment thread tst/unit/handlers/RelatedResourcesHandler.test.ts Dismissed
Comment thread tst/unit/handlers/RelatedResourcesHandler.test.ts Dismissed
Comment thread tst/unit/handlers/RelatedResourcesHandler.test.ts Dismissed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant